<template>
	<div style="border:1px solid #ddd;width:400px;background: #fff;">
		<slot name="header" v-bind:obj="obj"></slot>
		子集<input v-model="age" @input="inputHandle"/>
		{{val}}
		<slot name="footer"></slot>
	</div>
	
</template>

<script>
	export default {
		props:{
			val:'',
		},
		data() {
			return {
				age: '',
				obj: {
					title:'sync'
				}
			}
		},
		watch: {
			val:{
				handler(newV){
					this.age = newV;
				},
				immediate: true
			},
			
		},
		mounted() {
			
		},
		methods:{
			inputHandle() {
				this.$emit('update:val',this.age)
			}
		}
	}
</script>

<style>
</style>
